package com.bj58.mis.apm.server.statistics.dto.job;

import com.bj58.mis.apm.server.statistics.dto.DtoUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 〈一句话功能简述〉<br> 
 * 〈任务具体信息〉
 *
 * @author zhangyu84
 * @create 2018/6/19
 * @since 1.0.0
 */
@Data
public class KylinJobInfo {
    @ApiModelProperty(value = "任务ID")
    private String jobId;
    @ApiModelProperty(value = "任务名称")
    private String jobName;
    @ApiModelProperty(value = "任务开始时间")
    private String jobStartTime;
    @ApiModelProperty(value = "任务结束时间")
    private String jobEndTime;
    @ApiModelProperty(value = "任务耗时时间 单位为秒")
    private double jobTime;
    @ApiModelProperty(value = "任务MR等待时间 单位为秒")
    private double jobWaitTime;
    @ApiModelProperty(value = "任务状态")
    private String jobStatus;
    @ApiModelProperty(value = "任务cubeId")
    private String jobCubeId;
    @ApiModelProperty(value = "任务cube")
    private String jobCube;
    //cube名称
    private String jobCubeNameEn;
    @ApiModelProperty(value = "任务项目")
    private String jobProject;
    @ApiModelProperty(value = "任务项目标识")
    private String jobProjectCode;
    @ApiModelProperty(value = "耗时阈值.0表示未超过阈值.1表示超过阈值")
    private int jobTimeThreshold;

    @ApiModelProperty(value = "任务cube标识")
    public String getJobCubeCode() {
        return DtoUtil.getCubeCode(jobCubeNameEn);
    }
}
